package my.sample.io.file;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class ReadLineByLine {
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new FileReader("/tmp/cc/messages.1"));
			String line;
			while ((line = br.readLine()) != null) {
				// process the line.
				System.out.println(line);
//				System.out.println(line.split(",")[0] + ":" + line.split(",")[2] + "-" + line.split(",")[3] );
/*				if (line.startsWith("drop.hourly.db")) {
					System.out.println(line);
				}*/
			}
			br.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
